<?
@session_start();
$std_id         =$_POST['std_id'];
//$std_name       =$_POST['std_name'];
$std_birth       =$_POST['std_birth'];
$std_surname    =$_POST['std_surname'];
$personal_id    =$_POST['personal_id'];
$std_address    =$_POST['std_address'];
$std_phone      =$_POST['std_phone'];
$parent         =$_POST['parent'];

require_once '../inc/config.inc.php';
list($day,$month,$year) = explode("/",$std_birth);
$std_day = $year."-".$month."-".$day;
$sql="select std_id,std_name,std_surname from student where std_id='".$std_id."' and std_birth='".$std_day."' and status != 0";
$table = mysql_query($sql) or die(mysql_error());
$num = mysql_num_rows($table);
$row=mysql_fetch_array($table);
if($num>0)
{
    $_SESSION['std_id']=$row['std_id'];
    $_SESSION['std_name']=$row['std_name'];
    $_SESSION['std_surname']=$row['std_surname'];
    echo"<meta http-equiv='refresh' content='0;URL=../admin/informationstd.php'>";
}
else {
    $row = mysql_fetch_array($table);
    //if($std_id!=$row['std_id'] and $std_name!=$row['std_name'])
    echo"<meta http-equiv='refresh' content='0;URL=../login/no_loginstd.php'>";
    //exit() ;
}
?>
